import type { RouteRecordRaw } from 'vue-router'
export const ROOT_ROUTE_REDIRECT_PATH = '/main'
const Layout = () => import('~/layouts/index.vue')

export const rootRoute: RouteRecordRaw = {
  path: '/',
  name: 'rootPath',
  redirect: ROOT_ROUTE_REDIRECT_PATH,
  component: Layout,
  children: [],
}

export default [
  {
    path: '/main',
    name: 'Main',
    meta:{
      title: '首页',
      icon: 'CrownOutlined'
    },
    component: ()=> import('~/pages/index/index.vue')
  },
  {
    path: '/register',
    name: 'RegisterManage',
    meta: {
      title: '注册管理',
      icon: 'DashboardOutlined',
    },
    component: ()=> import('~/pages/register/register.vue')
  },
  // {
    // path: '/iaaControl',
    // redirect: '/iaaControlManage',
    // name: 'IaaControl',
    // meta: {
    //   title: 'iaa管理',
    //   icon: 'AppleOutlined',
    //   keepAlive: true
    // },
    // component: basicRouteMap.RouteView,
    // children: [
      {
        path: '/iaaControlManage',
        name: 'IaaControlManage',
        meta: {
          title: '广告控制',
          icon: 'ControlOutlined'
        },
        component: ()=> import('~/pages/iaa/iaaControlManage.vue'),
      },
      // {
      //   path: '/iaaControlView',
      //   name: 'IaaControlView',
      //   meta: {
      //     title: '统计查看',
      //     icon: 'AppleOutlined'
      //   },
      //   component: ()=> import('~/pages/iaa/iaaControlView.vue'),
      // },
    {
      path: '/scriptManageView',
      name: 'scriptManageView',
      meta: {
        title: '脚本管理',
        icon: 'BankOutlined'
      },
      component: ()=> import('~/pages/script/scriptManageView.vue'),
    },
  {
    path: '/iaaScriptManageView',
    name: 'iaaScriptManageView',
    meta: {
      title: 'AS脚本管理',
      icon: 'DribbbleOutlined'
    },
    component: ()=> import('~/pages/script/iaaScriptManagerView.vue'),
  },
  {
    path: '/afCountView',
    name: 'afCountView',
    meta: {
      title: 'AF转化统计',
      icon: 'PieChartOutlined'
    },
    component: ()=> import('~/pages/afCount/afCountView.vue'),
  },
  {
    path: '/trafficCheck',
    name: 'trafficCheck',
    meta: {
      title: '流量监控',
      icon: 'DashboardOutlined'
    },
    component: ()=> import('~/pages/trafficCheck/trafficCheck.vue'),
  }
    // ]
  // }
] as RouteRecordRaw[]
